//
//  TwoKindCell.m
//  1243
//
//  Created by apple on 16/7/1.
//  Copyright © 2016年 1243. All rights reserved.
//

#import "TwoKindCell.h"

@implementation TwoKindCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.titleLB = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, WIDTH/3, 30)];
//        self.titleLB.backgroundColor = [UIColor redColor];
        
        
        [self.contentView addSubview:self.titleLB];
    }
    return self;
}


- (void)setUI:(NSInteger )num {
    if (num == 0) {
        self.titleLB.text = @"往期揭晓";
        self.img = [[UIImageView alloc]initWithFrame:CGRectMake(WIDTH - 40, 15, 20, 20)];
//        self.img.backgroundColor = [UIColor redColor];
        [self.img setImage:[UIImage imageNamed:@"reght111"]];
        [self.contentView addSubview:self.img];
    }else if (num == 1) {
        self.titleLB.text = @"参与用户记录";
        self.timeLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH - WIDTH/2 - 10, 10, WIDTH/2, 30)];
        self.timeLabel.backgroundColor = [UIColor blueColor];
        [self.contentView addSubview:self.timeLabel];
    }else {
        self.titleLB.text = @"用户名";
        self.peopleCount = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH - 110, 7, 100, 15)];
        self.dataLB = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH - 160, 21, 150, 20)];
        
        self.peopleCount.backgroundColor = [UIColor yellowColor];
        self.dataLB.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:self.peopleCount];
        [self.contentView addSubview:self.dataLB];
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
